package com.educate.dao;

import com.educate.pojo.Video;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author yjj
 * @date 2021/12/23
 * @Description Video实体
 */
@Mapper
public interface VideoDao {

    /**
     * 根据课程ID获取所有的视频
     * @param courseId
     * @return List<Video>
     */
    List<Video> selectAllVideosByCourseId(String courseId);

    /**
     * 删除视频
     * @param videoId
     */
    void deleteVideoByVideoId(String videoId);

    /**
     * 删除视频和课程连接表
     * @param videoId
     * @param courseId
     */
    void deleteVideoLinkCourseByIdS(@Param("videoId") String videoId,@Param("courseId") String courseId);


    /**
     * 获取视频文件名
     * @param videoId
     * @return FileName
     */
    String getVideoFileNameByVideoId(String videoId);

}
